
cc.Class({
    extends: cc.Component,

    properties: {
		
			topNode: {
				default: null,
				type: cc.Node
			},
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},
//显示升级界面--预制体
	showTip: function(event, customEventData) {
		var that = this;

		var CanvasNode = this.topNode;

		if (!CanvasNode) {
			cc.log('find Canvas error');
			return;
		}
		
		var onResourceLoaded = function(errorMessage, loadedResource) {
			if (errorMessage) {
				cc.log('Prefab error:' + errorMessage);
				return;
			}
			if (!(loadedResource instanceof cc.Prefab)) {
				cc.log('Prefab error');
				return;
			}
		
		
			var newMyPrefab = cc.instantiate(loadedResource);
		
			CanvasNode.addChild(newMyPrefab, 100);
		
			newMyPrefab.setPosition(0, 0);
		
			var newMyPrefabScript = newMyPrefab.getComponent('Mission');
		
			};
			
			 
			cc.resources.load('Mission', onResourceLoaded);
		 
			
			
			
			
			
			
	},
    start () {

    },

    // update (dt) {},
});
